CREATE EXTERNAL TABLE jms_dwd.dwd_tab_reback_transfer_express_base_hi(
  `waybill_no` string COMMENT '订单号',
  `transfer_waybill_no` string COMMENT '转寄运单号',
  `apply_type_code` bigint COMMENT '申请类型',
  `apply_type_name` string COMMENT '申请类型名称',
  `express_type_id` bigint COMMENT '产品类型id',
  `express_type_code` string COMMENT '产品类型code',
  `express_type_name` string COMMENT '产品类型名称',
  `package_charge_weight` double COMMENT '原运单重量',
  `total_freight` double COMMENT '原总运费',
  `settlement_code` string COMMENT '原结算方式编码',
  `settlement_name` string COMMENT '原结算方式名称',
  `new_package_charge_weight` double COMMENT '新运单重量',
  `new_total_freight` double COMMENT '新总运费',
  `new_settlement_id` bigint COMMENT '新结算方式id',
  `new_settlement_code` string COMMENT '新结算方式编码',
  `new_settlement_name` string COMMENT '新结算方式名称',
  `sender_name` string COMMENT '原寄件人姓名',
  `sender_mobile_phone` string COMMENT '原寄件人手机号',
  `sender_telphone` string COMMENT '寄件人座机',
  `sender_province_id` bigint COMMENT '原寄件省份id',
  `sender_province_name` string COMMENT '原寄件省份名称',
  `sender_city_id` bigint COMMENT '原寄件城市id',
  `sender_city_name` string COMMENT '原寄件城市名称',
  `sender_area_id` bigint COMMENT '原寄件区域Id',
  `sender_area_name` string COMMENT '原寄件区域名称',
  `sender_township` string COMMENT '原寄件乡镇',
  `sender_street` string COMMENT '原寄件街道',
  `sender_detailed_address` string COMMENT '原寄件详细地址',
  `receiver_name` string COMMENT '原收件人姓名',
  `receiver_mobile_phone` string COMMENT '原收件人手机号',
  `receiver_telphone` string COMMENT '原收件人座机',
  `receiver_province_id` bigint COMMENT '原收件省份id',
  `receiver_province_name` string COMMENT '原收件省份名称',
  `receiver_city_id` bigint COMMENT '原收件城市id',
  `receiver_city_name` string COMMENT '原收件城市名称',
  `receiver_area_id` bigint COMMENT '原收件区域id',
  `receiver_area_name` string COMMENT '原收件区域名称',
  `receiver_township` string COMMENT '原收件乡镇',
  `receiver_street` string COMMENT '原收件街道',
  `receiver_detailed_address` string COMMENT '原收件详细地址',
  `new_sender_name` string COMMENT '新寄件人姓名',
  `new_sender_mobile_phone` string COMMENT '新寄件人手机号',
  `new_sender_telphone` string COMMENT '新寄件人座机',
  `new_sender_province_id` bigint COMMENT '新寄件省份id',
  `new_sender_province_name` string COMMENT '新寄件省份名称',
  `new_sender_city_id` bigint COMMENT '新寄件城市id',
  `new_sender_city_name` string COMMENT '新寄件城市名称',
  `new_sender_areaid` bigint COMMENT '新寄件区域Id',
  `new_sender_areaname` string COMMENT '新寄件区域名称',
  `new_sender_township` string COMMENT '新寄件乡镇',
  `new_sender_street` string COMMENT '新寄件街道',
  `new_sender_detailed_address` string COMMENT '新寄件详细地址',
  `new_receiver_name` string COMMENT '新收件人姓名',
  `new_receiver_mobile_phone` string COMMENT '新收件人手机号',
  `new_receiver_telphone` string COMMENT '新收件人座机',
  `new_receiver_province_id` bigint COMMENT '新收件省份id',
  `new_receiver_province_name` string COMMENT '新收件省份名称',
  `new_receiver_city_id` bigint COMMENT '新收件城市id',
  `new_receiver_city_name` string COMMENT '新收件城市名称',
  `new_receiver_area_id` bigint COMMENT '新收件区域id',
  `new_receiver_areaname` string COMMENT '新收件区域名称',
  `new_receiver_township` string COMMENT '新收件乡镇',
  `newreceiver_street` string COMMENT '新收件街道',
  `newreceiver_detailed_address` string COMMENT '新收件详细地址',
  `abnormal_reg_network_id` bigint COMMENT '问题件登记网点id',
  `abnormal_reg_network_name` string COMMENT '问题件登记网点名称',
  `apply_network_id` bigint COMMENT '申请网点id',
  `apply_network_code` string COMMENT '申请网点code',
  `apply_network_name` string COMMENT '申请网点名称',
  `apply_staff_code` string COMMENT '申请人code',
  `apply_staff_name` string COMMENT '申请人名称',
  `apply_source` smallint COMMENT '申请来源 1人工录入 2问题件录入 3 总部工',
  `apply_source_name` string COMMENT '申请来源名称',
  `examine_staff_name` string COMMENT '审核人名称',
  `examine_staff_code` string COMMENT '审核人code',
  `examine_network_id` bigint COMMENT '审核网点id',
  `examine_network_code` string COMMENT '审核网点code',
  `examine_network_name` string COMMENT '审核网点名称',
  `examine_time` timestamp COMMENT '审核时间',
  `apply_time` timestamp COMMENT '申请时间',
  `status` smallint COMMENT '状态 1待审核，2已审核,3 取消申请,4.驳回',
  `status_name` string COMMENT '状态名称',
  `reback_transfer_network_id` bigint COMMENT '退转件网点id',
  `reback_transfer_network_code` string COMMENT '退转件网点code',
  `reback_transfer_network_name` string COMMENT '退转件网点名称',
  `sender_network_name` string COMMENT '寄件(揽收)网点名称',
  `sender_network_code` string COMMENT '寄件(揽收)网点code',
  `sender_network_id` bigint COMMENT '寄件(揽收)网点id',
  `print_flag` smallint COMMENT '面单是否已打印 1是 0否',
  `print_count` smallint COMMENT '面单打印次数',
  `revoke_code` string COMMENT '撤销人code',
  `revoke_name` string COMMENT '撤销人名称',
  `revoke_time` timestamp COMMENT '撤销时间',
  `revoke_network_name` string COMMENT '撤销网点',
  `revoke_network_code` string COMMENT '撤销网点code',
  `revoke_network_id` bigint COMMENT '撤销网点id',
  `reject_name` string COMMENT '驳回人名称',
  `reject_time` timestamp COMMENT '驳回时间',
  `reason` string COMMENT '驳回/撤销原因',
  `reject_network_name` string COMMENT '驳回网点',
  `reject_network_code` string COMMENT '驳回网点code',
  `reject_network_id` bigint COMMENT '驳回网点id',
  `entry_type` smallint COMMENT '录入类型 1拦截件 2 问题件',
  `transfer_reason` string COMMENT '转寄原因',
  `reback_reason` string COMMENT '退回原因',
  `reback_transfer_reason` string COMMENT '退转原因',
  `dispatch_code` string COMMENT '派件方式code',
  `dispatch_name` string COMMENT '派件方式名称',
  `goods_type_id` bigint COMMENT '物品类型id',
  `goods_type_code` string COMMENT '物品类型code',
  `goods_type_name` string COMMENT '物品类型名称',
  `parcel_number` int COMMENT '件数,＞1表示子母件，如果业务上不支持子母件，则前端限制不显示，并默认为1',
  `package_length` double COMMENT '包裹总长,单位厘米',
  `package_wide` double COMMENT '包裹总宽,单位厘米',
  `package_high` double COMMENT '包裹总高,单位厘米',
  `box_number` int COMMENT '包材数量 小于等于999',
  `cod_need` smallint COMMENT '是否需要代收货款,1是，0否',
  `cod_money` double COMMENT '代收货款金额',
  `insured` smallint COMMENT '是否需要保价,1是，0否',
  `insured_amount` double COMMENT '保价金额',
  `print_time` timestamp COMMENT '打印时间',
  `print_user_name` string COMMENT '打印人姓名',
  `print_user_code` string COMMENT '打印人code',
  `print_user_id` bigint COMMENT '打印人id',
  `print_network_name` string COMMENT '打印网点名称',
  `print_network_code` string COMMENT '打印网点code',
  `print_network_id` bigint COMMENT '打印网点id',
  `pick_finance_name` string COMMENT '财务中心名称',
  `pick_finance_code` string COMMENT '财务中心code',
  `pick_finance_id` bigint COMMENT '财务中心id',
  `order_source_code` string COMMENT '订单来源',
  `customer_order_id` string COMMENT '客户订单编号',
  `origin_id` bigint COMMENT '始发地id',
  `origin_code` string COMMENT '始发地code',
  `origin_name` string COMMENT '始发地名称',
  `destination_id` bigint COMMENT '始发地id',
  `destination_code` string COMMENT '始发地code',
  `destination_name` string COMMENT '始发地名称',
  `is_real_name` smallint COMMENT '是否实名制,1是，0否',
  `real_name` string COMMENT '实名姓名',
  `id_no_type` smallint COMMENT '证件类型',
  `id_no` string COMMENT '证件号码',
  `sex` smallint COMMENT '性别',
  `customer_id` bigint COMMENT '客户id',
  `customer_code` string COMMENT '客户code',
  `customer_name` string COMMENT '客户名称',
  `send_code` string COMMENT '寄件方式code',
  `send_name` string COMMENT '寄件方式名称',
  `paid_mode_id` bigint COMMENT '支付方式id',
  `paid_mode_code` string COMMENT '支付方式code',
  `paid_mode_name` string COMMENT '支付方式名称',
  `new_insured` smallint COMMENT '新单是否需要保价 1重新投保 0不投保',
  `new_insured_amount` double COMMENT '新单保价金额',
  `new_terminal_dispatch_code` string COMMENT '三段码',
  `is_need_receipt` smallint COMMENT '是否需要需要签回单,1是，0否',
  `apply_network_type_id` bigint COMMENT '申请网点类型id',
  `terminal_dispatch_code` string COMMENT '原三段码',
  `origin_network_flag` smallint COMMENT '是否退回揽收网点 1是 2否',
  )
COMMENT '操作平台-退转件管理表'
partitioned by (dt string comment '分区日期-申请时间')
stored as parquet
location "/dw/hive/jms_dwd.db/external/dwd_tab_reback_transfer_express_base_hi"
tblproperties (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);